﻿using MVCDemol.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MVCDemol.Models
{
    public class MusicStoreDblnitializer:System.Data.Entity.DropCreateDatabaseAlways<MUsicStoreDB>
    {
        protected override void Seed(MUsicStoreDB context)
        {
            context.Artists.Add(new Artist { Name = "Jay chou" });

            context.Genres.Add(new Genre { Name = "异域风情", Description = "中国风音乐" });

            context.Albums.Add(new Album
            {
                Artist = new Artist { Name = "林俊杰" },
                Genre = new Genre { Name = "励志", Description = "安静，才能听见自己" },
                ArtistId = 2,
                Title = "不为谁而作的歌",
                Price = 9999.00m,
                AlbumArtUrl = "梦为努力浇了水，爱在背后往前推"
            });



            base.Seed(context);
        }
    }
}